home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CBASE102.ARJ / RDINST.BAT < prev    next >
DOS Batch File  |  1991-09-23  |  4KB  |  106 lines

  1. @echo off
  2. rem rolodeck installation batch file--------------------------------------------
  3. rem rdinst.bat    1.5 - 91/09/23
  4.  
  5. rem ----------------------------------------------------------------------------
  6. rem NAME
  7. rem      install.bat - rolodeck installation batch file for DOS
  8. rem
  9. rem SYNOPSIS
  10. rem      install model [x]
  11. rem
  12. rem DESCRIPTION
  13. rem     install.bat performs the installation of the rolodeck program for
  14. rem     DOS.  model specifies the memory model as one of the following.
  15. rem
  16. rem          S        small model
  17. rem          M        medium model
  18. rem          C        compact model
  19. rem          L        large model
  20. rem          H        huge model
  21. rem
  22. rem     If specified, the second parameter causes the reference manual to
  23. rem     be extracted from the source code.  The reference manual is placed
  24. rem     in the file rolodeck.man.
  25. rem
  26. rem SEE ALSO
  27. rem      makefile
  28. rem
  29. rem NOTES
  30. rem      This batch file is written for use with Microsoft C.  To convert
  31. rem      it for use with another compiler, make the following
  32. rem      modifications:
  33. rem           1. Replace \usr\include with the include directory used by
  34. rem              the new compiler.
  35. rem           2. Replace cl with the command to invoke the compiler being
  36. rem              used, replacing the switches also, if necessary.  Below
  37. rem              are listed the Microsoft C switches used and their
  38. rem              meanings.
  39. rem                   -Oalt     optimization
  40. rem                             a - relax alias checking
  41. rem                             l - enable loop optimization
  42. rem                             t - favor execution speed
  43. rem                   -Za       ANSI keywords only
  44. rem                   -A        memory model
  45. rem
  46. rem ----------------------------------------------------------------------------
  47.  
  48. rem verify arguments------------------------------------------------------------
  49. if "%1" == "S" goto arg1
  50. if "%1" == "M" goto arg1
  51. if "%1" == "C" goto arg1
  52. if "%1" == "L" goto arg1
  53. if "%1" == "H" goto arg1
  54. echo usage:  install model [x]
  55. echo Valid values for model are S (small), M (medium), C (compact),
  56. echo   L (large), and H (huge).  Model must be upper case.
  57. echo If x is specified, the reference manual will be extracted.
  58. goto end
  59. :arg1
  60.  
  61. if "%2" == "" goto arg2
  62. if "%2" == "x" goto arg2
  63. echo usage:  install model [x]
  64. echo Invalid second argument.  Valid value is lowercase x.
  65. goto end
  66. :arg2
  67.  
  68. if "%3" == "" goto arg3
  69. echo usage:  install model [x]
  70. echo Too many arguments specified.
  71. goto end
  72. :arg3
  73.  
  74. rem check if required libraries installed---------------------------------------
  75. if exist \usr\include\cbase.h goto cbase
  76. echo The cbase library must be installed first.
  77. goto end
  78. :cbase
  79.  
  80. rem extract the reference manual------------------------------------------------
  81. if not "%2" == "x" goto skipman
  82. echo Extracting reference manual into rolodeck.man.
  83. if not exist rolodeck.man goto man
  84. echo rolodeck.man exists.  ^C to exit, any other key to continue.
  85. pause
  86. :man
  87. if not exist tmp goto tmp
  88. echo tmp exists.  ^C to exit, any other key to continue.
  89. pause
  90. :tmp
  91. echo on
  92. copy rolodeck.c/a+cvtss.c+fdcset.c+fml.c tmp
  93. type tmp | manx -c > rolodeck.man
  94. del tmp
  95. @echo off
  96. :skipman
  97.  
  98. rem make rolodeck program-------------------------------------------------------
  99. echo on
  100. cl -c -Oalt -A%1 cvtss.c fdcset.c
  101. cl -Oalt -Za -A%1 rolodeck.c fml.c cvtss.obj %1cbase.lib %1btree.lib %1lseq.lib %1blkio.lib
  102. @echo off
  103.  
  104. rem end of rolodeck installation batch file-------------------------------------
  105. :end
  106.